package com.huangwenshuo.futurestarschoolmanagement.mapper;

import com.huangwenshuo.futurestarschoolmanagement.pojo.dto.CoursewareDto;
import com.huangwenshuo.futurestarschoolmanagement.pojo.po.Classes;
import com.huangwenshuo.futurestarschoolmanagement.pojo.po.Courseware;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huangwenshuo.futurestarschoolmanagement.pojo.vo.CoursewareVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author huangwenshuo
 * @since 2021-03-07
 */
@Mapper
public interface CoursewareMapper extends BaseMapper<Courseware> {

    List<CoursewareVo> getFlies(@Param("dto") CoursewareDto.CPage cPage);

    int getFliesTotal(@Param("dto")  CoursewareDto.CPage cPage);

    List<Classes> getClasses(int cid);

    List<String> getFos(Integer uid);

    void addFiles(@Param("dto") CoursewareDto.CPage page);

    void updateFile(@Param("dto") CoursewareDto.CPage page);

    void delFile(@Param("dto") CoursewareDto.CPage page);
}
